package com.example.javapoint.threads.priority;

class A extends Thread { // A 类继承自Thread,默认优先级是5
    @Override
    public void run() {
        super.run();
    }
}

public class ThreadPriorityExtends {
    public static void main(String[] args) {
        Thread.currentThread().setPriority(9);
        A a = new A();
        System.out.println("当前运行的线程：" + Thread.currentThread().getName());
        System.out.println("当前运行的线程优先级是：" + Thread.currentThread().getPriority());
        System.out.println("a 线程的优先级： " + a.getPriority());
    }
}
